package model

import (
	"gorm.io/gorm"
	"time"
)

type UserInfo struct {
	Id         uint32         `gorm:"column:id;type:int UNSIGNED;comment:用户ID;primaryKey;not null;" form:"id" json:"id"` // 用户ID
	Name       string         `gorm:"column:name;type:varchar(20);comment:用户名;not null;" form:"name" json:"name"`       // 用户名
	Info       string         `gorm:"column:info;type:varchar(30);comment:签名;not null;" form:"info" json:"info"`         // 签名
	CreatedAtd time.Time      `gorm:"column:created_atd;type:datetime(3);not null;default:CURRENT_TIMESTAMP(3);" form:"created_atd" json:"created_atd"`
	UpdatedAt  time.Time      `gorm:"column:updated_at;type:datetime(3);not null;default:CURRENT_TIMESTAMP(3);" form:"updated_at" json:"updated_at"`
	DeletedAt  gorm.DeletedAt `gorm:"column:deleted_at;type:datetime(3);default:NULL;" form:"deleted_at" json:"deleted_at"`
}

func (i *UserInfo) TableName() string {
	return "user_info"
}
